<template>
	<view class="repairs-details">
		<view class="top">
			<view class="title">
				房屋信息
			</view>
			<view class="house-name">
				<text class="left">
					{{repairsObj.houseInfo}}
				</text>
				<view class="right smz" v-if="repairsObj.status === 2">
					<text>上门中</text>
				</view>
				<view class="right slz" v-else-if="repairsObj.status === 1">
					<text>受理中</text>
				</view>

				<view class="right yqx" v-else-if="repairsObj.status === 0">
					<text>已取消</text>
				</view>
				<view class="right ywc" v-else>
					<text>已完成</text>
				</view>
			</view>
		</view>
		<view class="repairs-content">
			<view class="title">
				报修信息
			</view>
			<view class="message">
				<u--form labelPosition="left" ref="form1" labelWidth="208rpx">
					<u-form-item label="维修项目" borderBottom ref="item1">
						<u--input disabled disabledColor="#ffffff" border="none" :value="repairsObj.repairItemName">
						</u--input>
					</u-form-item>
					<u-form-item label="手机号码" borderBottom ref="item1">
						<u--input border="none" disabled disabledColor="#ffffff" :value="repairsObj.mobile">
						</u--input>
					</u-form-item>
					<u-form-item label="预约日期" borderBottom ref="item1">
						<u--input disabled disabledColor="#ffffff" border="none" :value="repairsObj.appointment ">
						</u--input>

					</u-form-item>
					<view class="describe">
						<view class="top">
							问题描述
						</view>
						<textarea class="text" disabled>
						{{repairsObj.description }}
						</textarea>
					</view>
					<view class="problem" v-if="repairsObj.status===1 || repairsObj.status===2 ">
						<view class="top">
							问题附件
						</view>
						<view class="picture">

							<image :src="item.url || item.thumb" mode="" class="img"
								v-for="item in repairsObj.attachment" :key="item.id">
							</image>
						</view>
					</view>
				</u--form>
			</view>
		</view>
		<view class="box">

		</view>
	</view>
</template>

<script>
	export default {
		name: "repairs-details",
		data() {
			return {

			};
		},
		props: {
			repairsObj: {
				type: Object
			}
		}
	}
</script>

<style lang="scss">
	.repairs-details {
		height: 100%;
		background-color: #FAFAFA;

		.top {
			.title {
				color: #979797;
				font-weight: regular;
				font-size: 24rpx;
				line-height: 1.5;
				letter-spacing: 0rpx;
				padding: 30rpx 0rpx 20rpx 30rpx;
			}

			.house-name {
				height: 102rpx;
				width: 100%;
				background-color: #fff;
				display: flex;
				justify-content: space-between;
				align-items: center;
				padding: 0 30rpx;
				box-sizing: border-box;

				.left {
					color: #333333;
					font-size: 28rpx;
					line-height: 1.5;
					letter-spacing: 0px;

				}

				.right {
					border-radius: 10rpx;
					width: 104rpx;
					height: 48rpx;
					font-size: 24rpx;
					line-height: 48rpx;
					letter-spacing: 0px;
					text-align: center;
				}

				.right {
					width: 104rpx;
					height: 48rpx;
					border-radius: 10rpx;
					text-align: center;

					text {
						font-size: 24rpx;
						line-height: 1.5;
					}

				}

				.smz {
					background: #EBF8F0;

					text {
						color: #27AE60;
					}
				}

				.slz {
					background: #E5F0FB;

					text {
						color: #2D9CDB;
					}
				}

				.ywc {
					background: #FCF5E9E5;

					text {
						color: #DEAB48;
					}
				}

				.yqx {
					background: #F2F2F6;

					text {
						color: #979797;
					}
				}
			}

		}

		.repairs-content {
			.title {
				color: #979797;
				font-weight: regular;
				font-size: 24rpx;
				line-height: 1.5;
				letter-spacing: 0rpx;
				padding: 30rpx 0rpx 20rpx 30rpx;
			}

			.message {
				padding: 0 30rpx;
				box-sizing: border-box;
				background-color: #fff;


				// ::v-deep .u-form-item__body {
				// 	height: 102rpx !important;
				// 	padding: 0;

				// }

				.describe {
					height: 206rpx;
					width: 100%;
					padding: 30rpx 0;
					box-sizing: border-box;
					border-bottom: 1rpx solid #F2F2F6;

					.top {
						color: #333333;
						font-size: 28rpx;
						line-height: 42rpx;

					}

					.text {
						width: 100%;
						height: 84rpx;
						color: #C3C3C5;
						font-size: 28rpx;
						line-height: 42rpx;
						margin-top: 20rpx;
					}
				}

				.problem {
					height: 276.5rpx;
					width: 100%;
					padding: 30rpx 0;
					border-bottom: 1px solid #F2F2F6;

					.top {
						color: #333333;
						font-size: 28rpx;
						line-height: 42rpx;

					}

					.picture {
						margin-top: 20rpx;

						.img {
							width: 154rpx;
							height: 154rpx;
							// background-color: red;
							margin-right: 10rpx;
						}
					}
				}
			}
		}

		.box {
			width: 100%;
			height: 40rpx;
			background-color: #FAFAFA;
		}
	}
</style>
